 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>中奖纪录管理</title>
    <link href="${base}/resource/admin/css/common.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="${base}/resource/admin/js/jquery.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/js/common.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/js/list.js"></script>
    <script type="text/javascript" src="${base}/resource/admin/datePicker/WdatePicker.js"></script>
    <script type="text/javascript">
        $().ready(function() {
        [@flash_message /]
        });
    </script>
</head>
<body>
<!-- 地址导航-->
<div class="path">
    <a href="${base}/admin/main.do">首页1</a> &raquo;用户中奖纪录<span>总记录数:${page.total}</span>
</div>
<form id="listForm" action="list.do" method="get">
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    手机号码：<input type="text" name="eq_mobile" class="text" value="${eq_mobile}" />
                </td>
                <td>
                    抽奖状态：  <select name="eq_int_status" class="text">
                    <option value="">所有</option>
                    <option value="0" [#if eq_int_status=='0']selected='selected'[/#if]>未兑换</option>
                    <option value="1" [#if eq_int_status=='1']selected='selected'[/#if]>已兑换</option>
                </select>
                </td>

                <td>
                    开始时间：<input type="text" id="beginDate" name="gt_datetime_winningDate" class="text Wdate" readonly="readonly"  value="[#if gt_datetime_winningDate??]${gt_datetime_winningDate?string("yyyy-MM-dd HH:mm:ss")}[#else]${beginData?string("yyyy-MM-dd HH:mm:ss")}[/#if]" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss', maxDate: '#F{$dp.$D(\'endDate\')}' });"/>
                </td>
                <td>
                    结束时间：<input type="text" id="endDate" name="lt_datetime_winningDate" class="text Wdate"  readonly="readonly"   value="[#if lt_datetime_winningDate??]${lt_datetime_winningDate?string("yyyy-MM-dd HH:mm:ss")}[#else]${endData?string("yyyy-MM-dd HH:mm:ss")}[/#if]"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate: '#F{$dp.$D(\'beginDate\')}',maxDate: '${currentDate}'});"/>
                </td>
                <td>
                    <button type="submit">检索</button>
                </td>
            </tr>
        </table>
    </div>
    <div class="bar">

        <div class="buttonWrap">
            <a href="export" class="iconButton" id="exportExcel">
                <span class="downIcon">&nbsp;</span>导出
            </a>
            <a href="javascript:;" id="refreshButton" class="iconButton">
                <span class="refreshIcon">&nbsp;</span>刷新
            </a>
            <div class="menuWrap">
                <a href="javascript:;" id="pageSizeSelect" class="button">
                    每页条数<span class="arrow">&nbsp;</span>
                </a>
                <div class="popupMenu">
                    <ul id="pageSizeOption">
                        <li>
                            <a href="javascript:;"[#if page.numPerPage == 10] class="current"[/#if] val="10">10</a>
                        </li>
                        <li>
                            <a href="javascript:;"[#if page.numPerPage == 20] class="current"[/#if] val="20">20</a>
                        </li>
                        <li>
                            <a href="javascript:;"[#if page.numPerPage == 50] class="current"[/#if] val="50">50</a>
                        </li>
                        <li>
                            <a href="javascript:;"[#if page.numPerPage == 100] class="current"[/#if] val="100">100</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <table id="listTable" class="list">
        <tr>
            <th class="check">
                <input type="checkbox" id="selectAll" />
            </th>
            <th>
                <span>用户ID</span>
            </th>
            <th>
            <span>用户电话</span>
        </th>
            <th>
                <span>参与活动</span>
            </th>
            <th>
                <span>等奖</span>
            </th>
            <th>
                <span>奖品</span>
            </th>
            <th>
                <span>奖品兑换</span>
            </th>

            <th>
                <span>中奖时间</span>
            </th>
            <th>
                <span>操作</span>
            </th>

        </tr>
        [#list page.content as gglwinning]
        <tr>
            <td>
                <input type="checkbox" name="ids" value="${gglwinning.id}" />
            </td>
            <td>
			${gglwinning.memberId}
            </td>
            <td>
			${gglwinning.mobile}
            </td>
            <td>
            ${gglwinning.gglhdname}
            </td>
            <td>
            ${gglwinning.jpname}
            </td>
            <td>
            ${gglwinning.jp}
            </td>
            <td>
                [#if gglwinning.status=="1"]
                <span style="color: #cc0000;">已兑换</span>[#else]未兑换
                [/#if]
            </td>
            <td>
            ${gglwinning.winningDate?string("yyyy-MM-dd HH:mm:ss")}
            </td>
            <td>
                [#if gglwinning.status=="1"]
                <a href="#"><span style="color: #cc0000;">[已兑]</span></a>[#else] <a href="OnStatus.do?id=${gglwinning.id}">[兑换]</a>
                [/#if]
            </td>


        </tr>
        [/#list]
    </table>
[@pagination pageNumber = page.pageNumber totalPages = page.totalPages]
    [#include "/common/pagination.ftl"]
[/@pagination]

</form>
<script type="text/javascript">
    $(function() {
        $("#exportExcel").click(function () {
            var $form = $("#listForm");
            $form.attr("action", "/gglwinning/export.do")
            $form.submit();
            return false;
        });
    });

</script>
</body>
</html>